package whu.cn.whushare.ui.main.my;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

import com.androidplus.util.ViewMapping;
import com.androidplus.util.ViewMappingUtil;

import whu.cn.whushare.R;
import whu.cn.whushare.ui.common.BaseActivity;

/**
 * Created by xiaoping on 2015/1/30.
 */
@ViewMapping(id= R.layout.activity_myinfo_employeeid_change)
public class InfoEmployeeIdChangeActivity extends BaseActivity {
    @ViewMapping(id = R.id.employee_id_change)
    private EditText mEmployeeIdChange;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        initViewsAndActions();
    }
    public static Intent getStartIntent(Context context) {
        Intent i = new Intent(context, InfoEmployeeIdChangeActivity.class);

        return i;
    }

    private void initViewsAndActions() {
        View root = ViewMappingUtil.mapView(this, this);
        getTopBar(root);
        mTopBar.title.setText(R.string.my_info_employee_id_change);
        mTopBar.rightText.setVisibility(View.VISIBLE);
        mTopBar.rightText.setText(R.string.save);
        initAction();
    }


    private void initAction() {
        mTopBar.rightText.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //创建一个Intent的实例
                Intent intent = new Intent();
                //设置从哪个activity启动哪个activity
                intent.setClass(InfoEmployeeIdChangeActivity .this, MyInfoActivity.class);
                //启动另一个activity
                startActivity(intent);
            }
        });

    }
}



